package com.lucenly.card.adapter;

import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.lucenly.card.R;
import com.lucenly.card.bean.InvitationBean;
import com.lucenly.card.utils.GlideUtils;
import com.lucenly.card.utils.TimeUtils;
import com.lucenly.card.view.MultiImageView;

public class InvitationBAdapter extends BaseQuickAdapter<InvitationBean,BaseViewHolder> {

    public InvitationBAdapter() {
        super(R.layout.item_invitation_b);
    }
    @Override
    protected void convert(BaseViewHolder helper, InvitationBean item) {
        MultiImageView iv_img = helper.getView(R.id.iv_img);
        TextView tv_num = helper.getView(R.id.tv_num);
        TextView tv_name = helper.getView(R.id.tv_name);
        TextView tv_num1 = helper.getView(R.id.tv_num1);
        TextView tv_money = helper.getView(R.id.tv_money);
        GlideUtils.getInstance(mContext).load(mContext,item.getInviteAvatar(),iv_img,R.color.gray_de);
        tv_name.setText(item.getInviteNickname());
        tv_money.setText(item.getRewardFee()+"");
        tv_num1.setText(TimeUtils.stampToDate(item.getCreateTime()*1000+"","yyyy-MM-dd"));
        tv_num.setText(item.getRank()+"");

    }
}
